/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package se.sll.service.catalogue.composite.camel.processor;

import java.io.IOException;
import org.apache.camel.Exchange;
import org.codehaus.jackson.JsonParseException;
import org.codehaus.jackson.map.JsonMappingException;

/**
 *
 * @author khaleddaham
 */
public class HTTPHeader {

    public void mimeType(Exchange exchange) throws JsonParseException, JsonMappingException, IOException {
        exchange.getOut().getHeaders().put("CONTENT_TYPE", "application/json; charset=UTF-8");
        exchange.getOut().getHeaders().put("Content-Type", "application/json; charset=UTF-8");
        exchange.getOut().getHeaders().put("content-type", "application/json; charset=UTF-8");
        exchange.getOut().getHeaders().put("Accept", "application/json; charset=UTF-8");
        exchange.getOut().getHeaders().put("CamelAcceptContentType", "application/json; charset=UTF-8");
        exchange.getOut().setBody(exchange.getIn().getBody());
    }
}
